<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //1  arr.length-1  push
        reverseArray1 = arr => {
        newArr = []

        for (let i = arr.length-1; i >= 0; i--) {
            newArr.push(arr[i])
        }
        return newArr
        
        }

        reverseArray1(["a", "b", "c", "d"]); //['d","c',"b","a"]
        console.log(reverseArray1(["a", "b", "c", "d"]))

        //2 reverse()
       let arr2 = ["a", "b", "c", "d"];
       let reversearr2 = arr2.reverse()
       console.log(reversearr2)

    </script>
</body>

</html>